import Utils from "./Utils";

const { ccclass, property } = cc._decorator;


@ccclass
export default class Loading extends cc.Component {
    public static Instance: Loading = null;

    onLoad() {
        Loading.Instance = this;
        this.onShowRankBtn();
    }

    onShowRankBtn() {
        let panel = cc.find("Canvas/ui/rankPanel");
        if (panel) {
            panel.active = true;
            panel.getComponent("rankPanel").init();
            return;
        }
        Utils.Instance.creatPanel("rankPanel", (rankPanel: cc.Node) => {
            rankPanel.zIndex = 999;
        }, { isFriendRank: true });
    }
}
